from typing import Optional
from .base import BaseSchema

class Token(BaseSchema):
    access_token: str
    token_type: str

class UserBase(BaseSchema):
    email: str
    username: str
    is_active: Optional[bool] = True
    workarea_id: Optional[int] = None

class UserCreate(UserBase):
    password: str

class User(UserBase):
    id: int
    role: str

    class Config:
        from_attributes = True
        orm_mode = True 